<?php 
HeaderScripts::addStyles(array(
	'admin/form.css'
));
?>
<?php echo FlashMessage::renderFlashInfoHtml() ?>
<div style="display:none;">
	<textarea name="runningLine" id="runningLine"><?php echo strval($data['runningLine']['value']) ?></textarea>
</div>
<div id="pagediv"></div>
<script type="text/javascript">
Ext.onReady(function(){
    Ext.form.Field.prototype.msgTarget = 'side';

    pageform = new Ext.FormPanel({
        labelWidth: 150,
        standardSubmit: true,
		fileUpload: true,
		url: '/admin/',
        frame:true,
        title: 'Настройки сайта',
        bodyStyle:'padding:5px 5px 0',
        width: 600,

        items: [{
                name: 'runningLine',
                xtype: 'textarea',
				value: document.getElementById('runningLine').value,
				fieldLabel: '<?php echo strval($data['runningLine']['title']) ?>',
				width: 420,
				height: 100
		}],

        buttons: [{
            text: 'Сохранить',
			handler: function(b) {
				var fp = this.ownerCt.ownerCt,
					form = fp.getForm();
				if (form.isValid()) {
					b.disable();
					form.getEl().dom.action = '/admin/settings/update/';
					form.submit();
            	} else {
					formhotelcreate.form.markInvalid();
					Ext.MessageBox.alert('Ошибка!', 'Ошибка, информация неверная! Проверьте правильность заполнения полей!');
				}
			}
        }]
    });

    pageform.render(Ext.get('pagediv'));
});
</script>